<%@ include file="/include.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <link rel="stylesheet" type="text/css" href="styles/default.css" >
  <script type="text/javascript" src="scripts/common.js"></script>
  <script type="text/javascript" src="scripts/date.js"></script>
  <script type="text/javascript" src="scripts/check.js"></script>
</head>

<body>
<form name="StatGoods" action="StatGoods.do" method="post">
<div class="main" style="width:100%;">
	<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
		<caption>
		 货物综合统计查询
		</caption>
		<tr>
		  <td>
		     <table border="0" width="70%">
		       <tr>
		         <td width="20%"></td>
		         <td width="28%"></td>
		         <td width="15%"></td>
		         <td ></td>
		       </tr>
		       <tr >
			         <td align="right">报检号</td>
			         <td><input type="text" name="declNo" value="${map.cgoods.declNo}"></td>
			      	 <td align="right">备案号</td>
			      	 <td>
			      		<mytag:comSearch code="${map.cgoods.backupCode}" name="backupCode" type="backupCode"/>
			      	</td>
		    	</tr>
		    	<tr >
		    		 <td align="right">货物名称</td>
			         <td>
			      	   <input type="text" name="goodsCname"  value="${map.cgoods.goodsCname}">
			         </td>
			      	 <td align="right">报检类型</td>
			      	 <td>
			      	   <mytag:select type="type" name="type" selectedCode="${map.cgoods.type}"/>
			         </td>
		    	</tr>
		    	<tr >
			         <td align="right">HS编码</td>
			         <td>
			      	   <mytag:comSearch code="${map.cgoods.hsCode}" name="hsCode" type="hsCode"/>
			      	   <input type="text" name="ciqCode" value="${map.cgoods.ciqCode}">
			         </td>
			      	 <td align="right">监管类别</td>
			      	 <td>
			      	   <input type="text" name="inspMonitorCond"  value="${map.cgoods.inspMonitorCond}">
			         </td>
		    	</tr>
		    	<tr >
			        <td align="right">检验结果</td>
			      	<td>
						<mytag:select type="testResult" name="inspectionResult" selectedCode="${map.cgoods.inspectionResult}"/>
				 	</td>
		      	 	<td align="right">原产国/地区</td>
		      	 	<td>
			      	 	<mytag:comSearch code="${map.cgoods.originCountryCode}" name="originCountryCode" type="country"/>
		        	</td>
		    	</tr>
		    	<tr >
			        <td align="right">检疫结果</td>
			      	<td>
						<mytag:select type="testResult" name="quarantineResult" selectedCode="${map.cgoods.quarantineResult}"/>
				 	</td>
				 	<td align="right">报检日期范围</td>
				 	<td>
				 		<input type="text" class="readonly" name="map['beginDate']" value="${map.cgoods.map['beginDate']}" readonly="readonly" style="width:70px;" onclick="setday(this)">
				 		～
				 		<input type="text" class="readonly" name="map['endDate']" value="${map.cgoods.map['endDate']}" readonly="readonly" style="width:70px;" onclick="setday(this)">
				 	</td>
		    	</tr>
		        <tr class="button">
		         <td colspan="4">
		         	<input type="submit" value=" 查询 " />&nbsp;
		         	<input type="button" value=" 导出 " onclick="return exportGoods();" />&nbsp;
		           	<input type="button" value=" 清空 " onclick="clearInput();" />
		         </td>
		        </tr>
	     </table>
	  </td>
	</tr>
	  
		<tr height="30">
		    <td align="center">
		    	<mytag:pagination pager="${map.page}" pageSize="10"  suppressHidden="true"/>
		    </td>
		</tr>
		<tbody>
		  <tr>
		    <td align="center">
		      <table class="list">
		        <tr class="title">
		          <td width="4%">序号</td>
		          <td>报检号</td>
		          <td>备案号</td>
		          <td>报检类型</td>
		          <td>货物名</td>
		          <td>HS编码</td>
		          <td>监管类别</td>
		          <td>原产国/地区</td>
		          <td>检验</td>
		          <td>检疫</td>
		          <%-- 
		          <td>木包装</td>
		          --%>
		          <td width="5%">操作</td>
		        </tr>
		<c:forEach items="${map.page.items}" varStatus="stat" var="goods">
		        <tr>
		          <td>${stat.count+map.page.seq}</td>
		          <td>${goods.declNo}</td>
		          <td><mytag:c2s key="${goods.backupCode}" type="backupCode"/></td>
		          <td><mytag:c2s key="${goods.type}" type="type"/></td>
		          <td>${goods.goodsCname}</td>
		          <td>${goods.hsCode}</td>
		          <td>${goods.inspMonitorCond}</td>
		          <td><mytag:c2s key="${goods.originCountryCode}" type="country"/></td>
		          <td><mytag:c2s type="testResult" key="${goods.inspectionResult}"/></td>
		          <td><mytag:c2s type="testResult" key="${goods.quarantineResult}"/></td>
		          <%-- 
		          <td><mytag:c2s type="testResult" key="${goods.packResult}"/></td>
		          --%>
		          <td>
		          <c:if test="${goods.type=='A'}">
		           <a class="deco" href="NormalDeclView.html?gid=${goods.id}">查看</a>
		          </c:if>
		          <c:if test="${goods.type=='B'}">
		           <a class="deco" href="MainDeclView.html?gid=${goods.id}">查看</a>
		          </c:if>
		          </td>         
		        </tr>
		</c:forEach>
		      </table>
		    </td>
		  </tr>
		</tbody>
		<tr height="30">
		  <td align="center">
		  	<mytag:pagination pager="${map.page}" pageSize="10"  suppressHidden="false"/>
		  </td>
		</tr>
	</table>
</div>
</form>
</body>
</html>
